﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'SearchAsignacion')
	BEGIN
		DROP  Procedure  SearchAsignacion
	END

GO

CREATE Procedure SearchAsignacion

	(
		@desde datetime,
		@hasta datetime,
		@tipo int
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[Descripcion],
	[Fecha],
	[IdAsignacion],
	[IdEmpleado],
	[IdNotaSalida],
	[Tipo]
	FROM [Asignacion]
	WHERE ([Fecha] BETWEEN @desde AND @hasta) AND Tipo = @tipo

	SET NOCOUNT OFF
END


GO

GRANT EXEC ON SearchAsignacion TO PUBLIC

GO


